package com.lsp.config;

import com.lsp.condition.MyAspect;
import com.lsp.condition.MyConditional;
import com.lsp.condition.MyLog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConditionConfig {

    @Bean
    public MyAspect myAspect() {
        return new MyAspect();
    }

    @Conditional(value = MyConditional.class)
    @Bean
    public MyLog myLog(){
        return new MyLog();
    }

}
